package org.benben.shortlink.project.common.enums;

import org.benben.shortlink.project.common.convention.errorcode.IErrorCode;

/**
 * 短链接相关异常码
 *
 * @author benben
 */
public enum ShortLinkErrorCodeEnum implements IErrorCode {

    SHORTLINK_CREATE_ERROR("B000300", "短链接频繁生成，请稍后再试"),
    SHORTLINK_GENERATE_DUPLICATES_ERROR("B000301", "短链接生成重复"),
    SHORTLINK_NOT_EXIST_ERROR("B000302", "短链接记录不存在"),
    ;

    private final String code;

    private final String message;

    ShortLinkErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }

}
